<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>运算符</title>
</head>
<body>
    <script>
        /*
        算术运算符
+    -   *    /    %    ++    --

        */
       // ++ -- 单目运算符

       let num = 8;

       //num++ 返回运算之前的值,++num,反之
    //    let num2 = num++
                    // 1       3     3      4    5
       let num3 = num++ + ++num +num++ +num++ - num--
                    // 2       3      4     5
       console.log(num>>1)

       // & | ^ >> <<


    
       let a =1;
       let b = +"1";
       //如何不用第三个变量,交换两个变量值

       

       
       a = a*b //a是中间值
       b = a/b //b变成a
       a = a/b

    //    c = a;
    //    a = b;
    //    b = c;
    //    console.log(a+":"+b)

    let str1  = undefined;

    let str2 = !null

    let boo = Boolean(str1)






    console.log(boo)
    // console.log(str1!==str2)

    if(1){
        // console.log(!str1)
    }
      



    </script>
</body>
</html>